package com.zjlab.sandtable.handler;

import com.zjlab.sandtable.bean.CarSpeedInfo;
import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author xue
 * @create 2022-11-07 15:28
 */
@Slf4j
@Component
@ChannelHandler.Sharable
public class CarSpeedInfoHandler extends SimpleChannelInboundHandler<CarSpeedInfo> {

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, CarSpeedInfo msg) throws Exception {
        log.info("收到小车速度信息：{}", msg);
    }

}